package com.crmxconsumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.pojo.Borrow;
import com.service.BorrowService;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/borrow")
public class BorrowController {

    @Reference
    private BorrowService borrowService;

    @RequestMapping("getborrow")
    public String getborrow(Model model){
        List<Borrow> borrowList=borrowService.getborrow();
        model.addAttribute("borrowlist",borrowList);
        return "borrowlist";
    }

}
